{% extends 'base.html' %}

{% block title %}{{ novel.title }} - 小说阅读网{% endblock %}

{% block content %}
    <div class="novel-detail">
        <div class="novel-header">
            <img src="{{ novel.cover }}" alt="{{ novel.title }}" class="novel-cover">
            <div class="novel-meta">
                <h1 class="novel-title">{{ novel.title }}</h1>
                <p class="novel-author">作者: {{ novel.author }}</p>
                <div class="novel-description">
                    <h3>内容简介</h3>
                    <p>{{ novel.description }}</p>
                </div>
            </div>
        </div>

        <div class="chapter-list">
            <h2>章节列表</h2>
            {% for chapter in novel.chapters %}
                <div class="chapter-item">
                    <a href="{{ url_for('read_chapter', novel_id=novel.id, chapter_id=chapter.id) }}">{{ chapter.title }}</a>
                </div>
            {% endfor %}
        </div>
    </div>
{% endblock %}